//
//  NewsTableViewCell.m
//  10-CellSelfSize
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "UIView+Frame.h"

@interface NewsTableViewCell ()
@property (nonatomic, strong)UILabel *label;
@end
@implementation NewsTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.label = [[UILabel alloc] initWithFrame:CGRectZero];
        _label.numberOfLines = 0;
        [self.contentView addSubview:_label];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _label.frame = CGRectMake(0, 0, self.contentView.LST_width, self.contentView.LST_height);
    NSLog(@"%f", self.contentView.LST_height);
    NSLog(@"%f", self.LST_height);
}
- (void)setString:(NSString *)string {
    _string = [string copy];
    _label.text = _string;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
